package bb.lanxing.test;

import android.util.Log;

public class TimerLogger {
    private static final String TAG = "TimerLogger";
    private static long time;

    public static void reset() {
        time = System.currentTimeMillis();
    }

    public static void logCost(String tag, String msg) {
        long currentTimeMillis = System.currentTimeMillis();
        Log.i(tag, msg + " cost time = " + (currentTimeMillis - time));
        time = currentTimeMillis;
    }

    public static void logCost(String msg) {
        logCost(TAG, msg);
    }
}
